package ut.util;
import java.util.Date;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import java.text.SimpleDateFormat;
public class DateTime{
	private static TimeZone timeZone = TimeZone.getTimeZone("GMT+08:00");
	private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
	private static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	static{
		dateFormat.setTimeZone(timeZone);
		dateTimeFormat.setTimeZone(timeZone);
	}
	public static String toDate(Date date){
		return dateFormat.format(date);
	}
	public static String toDateTime(Date date){
		return dateTimeFormat.format(date);
	}
}